home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 67 / maccd 67.iso / online / Modified iMac Modem script ƒ / Modified iMac modem v90 > 28K < prev   
Encoding:
Text File  |  2000-02-29  |  17.0 KB  |  859 lines  |  [mlts/slnk]

  1. ! 2/29/00 - allows no less than 28000 bps. redials forever if less.
  2. !         - should eliminate "modem not responding" problems. script near max of lines.
  3. !
  4. ! modified by tjm 12/14/99 - set min speed to 28800, v90, speaker volume to low
  5. !
  6. !  Apple Internal Modem 56k
  7. !    Author:    OIivier Mardinian (based on Kris Kreutzman's and Apple/GV V.90 Scripts)
  8. !
  9. !    Copyright:    © 1991-1999 Apple Computer, Inc.    All Rights Reserved.
  10. !
  11. !    revision history:
  12. !        v1.0    6/22/98        Designed for the iMac, 1st generation PB G3 machines 
  13. !               8/10/99     Removed all the project names, and added L3 in the main init string
  14. !
  15. !  'mlts' resource info for this modem:
  16. !    byte 1 == 01 -> modem HAS built-in error correction protocols
  17. !    byte 2 == 01 -> modem HAS built-in data compression protocols
  18. !    byte 3 == 40 -> max number of chars in varstr 7
  19. !    byte 4 == 40 -> max number of chars in varstr 8
  20. !    byte 5 == 40 -> max number of chars in varstr 9
  21. !    
  22. @ORIGINATE
  23. @ANSWER
  24. ! ---- Initial modem setup ----
  25. ! In originate mode, set serial port speed depending upon the compression flag
  26. ! - A higher rate with compression on (PPP) to handle expanded data from the modem
  27. ! - A lower rate closer to the DCE when compression is off (ARA)
  28. ifstr 5 1 "0"
  29. !note "setting port speed 230400." 2 !tjm
  30. !pause 10
  31. serreset 230400, 0, 8, 1
  32. !serreset 115200, 0, 8, 1 !orig imac 12/14/99
  33. jump 2
  34. !
  35. @LABEL 1
  36. !note "setting port speed 57600." 2 !tjm
  37. !pause 10
  38. serreset 57600, 0, 8, 1
  39. !
  40. @LABEL 2
  41. hsreset 0 0 0 0 0 0
  42. settries 0
  43. !
  44. ! Get the modem's attention
  45. !
  46. matchclr
  47. matchstr 1 3 "OK\13\10"
  48. write "AT\13"
  49. matchread 60
  50. pause 90
  51. !
  52. ! +MS= <mod>
  53. ! ,[<automode>][,[<min_RX_rate>][,[<max_RX_rate>][,[<x_law>][,[<reserved>],     \N4%C2
  54. ! [<max_TX_rate>]]]]]]<CR>
  55. @LABEL 3
  56. matchclr
  57. matchstr 1 4   "OK\13\10"
  58. matchstr 2 101 "ERROR\13\10"
  59. !note "writing modem init." 2 !tjm
  60. !pause 10
  61. write "AT&FL1E0W1Q0V1X4&C1&K3S36=0S95=1&D3S7=75S0=0+MS=12,0,28000,56000\13"
  62. write "at\\n4%c2\13"
  63. !write "AT&FL3E0W1Q0V1X4&C1&K3S95=1&D3S7=75S0=0\13" !orig imac 12/14/99
  64. !write "AT&FE0W1Q0V1X4&C1&K3S95=1&D3S7=75S0=0\13"
  65. !write "AT&FE0Q0V1X4&C1&K3S95=1S7=75S0=0\13"            (modified on 8/31/98)
  66. !write "AT&FE0W2S95=45S0=0&D3S7=60\13"                    (••••• Original GV script)
  67. matchread 90
  68. inctries
  69. iftries 3 101
  70. !
  71. ! Reset the Modem on setup failure
  72. !
  73. !------------------------- 2/28/00
  74. ! I added this to try and eliminate the "modem not responding error"
  75. !
  76. write "+++"
  77. note "Modem not responding. Trying again." 2
  78. pause 10
  79. write "ATH\13"
  80. write "ATZ\13"
  81. !
  82. !-------------------------
  83. !
  84. DTRClear
  85. pause 5
  86. DTRSet
  87. flush
  88. pause 90
  89. jump 3
  90. !
  91. !
  92. @LABEL 4
  93. ! Modem now responding and configured for full EC/DC functions.
  94. ! Varstring 4 , reliable link protocol:
  95. !    = 0, handled by computer (ARAP)
  96. !    = 1, handled by modem (PPP)
  97. !    = 2, MNP10 protocol (Cellular protocol, no longer supported)
  98. ! If PPP or Cellular mode, jump to 5, otherwise (ARA) disable EC/DC.
  99. ifstr 4 5 "1"
  100. ifstr 4 5 "2"
  101. !
  102. ! Varstring 4 == 0, turn off reliable link protocol in modem (ARAP)
  103. !note "at turn of reliable link." 2 !tjm
  104. !pause 10
  105. matchclr
  106. matchstr 1 9 "OK\13\10"
  107. write "AT\\N0\13"
  108. matchread 30
  109. jump 101
  110. !
  111. !
  112. @LABEL 5
  113. ! This is where MNP10 (or MNP10EC) could go, if/when we support that.
  114. ! Standard EC/DC is still on.  Decide whether to turn off DC.
  115. ! Varstring 5, compression protocol:
  116. !    = 0, handled by computer 
  117. !    = 1, handled by modem
  118. ifstr 5 9 "1"
  119. !
  120. ! Varstring 5 == 0, turn off compression protocol in modem.
  121. !note "at turn off compression." 2 !tjm
  122. !pause 10
  123. matchclr
  124. matchstr 1 9 "OK\13\10"
  125. write "AT%C0\13"
  126. matchread 30
  127. jump 101
  128. !
  129. !
  130. @LABEL 9
  131. ! If speaker on flag is true, jump to 13.  Otherwise, turn the speaker off.
  132. ! Varstring 2, modem speaker:
  133. !    = 0, speaker off
  134. !    = 1, speaker on
  135. ifstr 2 13 "1"
  136. pause 5
  137. matchclr
  138. matchstr 1 13 "OK\13\10"
  139. write "ATM0\13"
  140. matchread 30
  141. jump 101
  142. !
  143. ! Modem ready, wait for a call or originate a call
  144. !
  145. @LABEL 13
  146. ifANSWER 32
  147. !
  148. !
  149. ! ---- Originating a call ----
  150. ! For normal dialing, jump to 19.  Otherwise, manual dial jumps to 15, blind dial
  151. !    jumps to 17.
  152. ! Varstring 6, dialing mode:
  153. !    = 0, normal dialing
  154. !    = 1, blind dialing
  155. !    = 2, manual dialing
  156. ifstr 6 17 "1"
  157. ifstr 6 15 "2"
  158. jump 19
  159. !
  160. @LABEL 15
  161. ! Display ASK dialog with message.  Goto label 107 if dialog canceled.
  162. ASK 2 "Pick up the phone & dial ^1.  Hit OK when the phone rings, then hangup." 107
  163. note "Manual dialing initiated" 3
  164. ! X1S6=4 to ignore dialtone 4 seconds, & ignore busy, D to dial, \^ generates data tone
  165. !write "ATX1D\^\13"                            (••••• Original script for 1st gen. PB G3)
  166. write "ATX1S6=4D\13"
  167. jump 32
  168. !
  169. @LABEL 17
  170. note "Dialing without tone" 3
  171. matchclr
  172. matchstr 1 19 "OK\13\10"
  173. ! X1S6=4 to ignore dialtone 4 seconds, & ignore busy for blind dialing.
  174. !write "ATX1\13"                            (••••• Original script for 1st gen. PB G3)
  175. !write "ATX1S6=4\13"                        (••••• Origianl script for 2nd gen. PB G3)
  176. write "ATX3S6=4\13"
  177. matchread 30
  178. jump 101
  179. !
  180. !
  181. @LABEL 19
  182. ! This is where we break up long dialstrings
  183. ! Display the full dialstring contained in Varstring 1
  184. note "Dialing ^1" 3
  185. !
  186. ! Varstrings 7, 8 and 9, contain dialstring fragments
  187. !    Long phone numbers may have been split into smaller groups
  188. !    so that the modem can use them
  189. ! Check to see whether these fragments exist.  If they do, dial them one at a time.
  190. ! If not, jump ahead and dial the remaining phone number.  Use the data tone.
  191. ! Varstring 3:  "p" for pulse & "t" for tone dialing
  192. ! Varstring 8 == blank (dialstring in varstring 7)
  193. ! Varstring 9 == blank (dialstring in varstrings 7 & 8)
  194. ! Otherwise (dialstring in varstrings 7, 8 & 9)
  195. ! \^ is added to the dialstring to force the modem to generate a data tone
  196. ifstr 8 27 " "
  197. ifstr 9 24 " "
  198. !
  199. !  Write dialstring in varstrings 7, 8 & 9
  200. matchclr
  201. matchstr 1 21 "OK\13\10"
  202. write "ATD^3^7;\13"
  203. matchread 400
  204. jump 101
  205. @LABEL 21
  206. matchclr
  207. matchstr 1 22 "OK\13\10"
  208. write "ATD^3^8;\13"
  209. matchread 400
  210. jump 101
  211. @LABEL 22
  212. write "ATD^3^9\13"
  213. jump 32
  214. !
  215. !
  216. @LABEL 24
  217. !  Write dialstring in varstrings 7 & 8
  218. matchclr
  219. matchstr 1 25 "OK\13\10"
  220. write "ATD^3^7;\13"
  221. matchread 400
  222. jump 101
  223. @LABEL 25
  224. write "ATD^3^8\13"
  225. jump 32
  226. !
  227. @LABEL 27
  228. !  Write dialstring in varstring 7
  229. write "ATD^3^7\13"
  230. !
  231. !
  232. !    ---- Connection response ----
  233. !
  234. ! The following section will parse modem responses of five types:
  235. !   1) PROTOCOL: xxx, COMPRESSION: xxx, CONNECT xxx
  236. !   2) CONNECT xxx/ARQ/V42
  237. !   3) Standard incoming and outgoing call progress messages
  238. !   4) FAX/DATA discrimination messages
  239. !   5) International DELAYED & BLACKLISTED restrictions.
  240. !
  241. @LABEL 32
  242. matchclr
  243. matchstr  1 88  "RING\13\10"
  244. matchstr  2 102 "NO DIALTONE\13\10"
  245. matchstr  3 103 "NO CARRIER"
  246. matchstr  4 103 "ERROR\13\10"
  247. matchstr  5 104 "BUSY\13\10"
  248. matchstr  6 105 "NO ANSWER\13\10"
  249. matchstr  7 33  "CONNECT "
  250. matchstr  8 32  "CARRIER"
  251. matchstr  9 40  "CONNECT\13\10"
  252. matchstr 10 82  "PROTOCOL: LAP"
  253. matchstr 11 82  "PROTOCOL: MNP"
  254. matchstr 12 82  "PROTOCOL: ALT"
  255. matchstr 13 84  "COMPRESSION: V"
  256. matchstr 14 84  "COMPRESSION: MNP5"
  257. matchstr 15 84  "COMPRESSION: CLASS"
  258. matchstr 16 110  "DELAYED  "
  259. matchstr 17 111  "BLACKLISTED\13\10"
  260. matchread 700
  261. ifANSWER 32
  262. jump 101
  263. !
  264. @LABEL 33
  265. matchclr
  266.  
  267. matchstr  1 39 "2400\13"
  268. matchstr  2 39 "2400/"
  269. matchstr  3 40 "4800\13"
  270. matchstr  4 40 "4800/"
  271. matchstr  5 41 "7200"
  272. matchstr  6 42 "9600"
  273. matchstr  7 43 "12000"
  274. matchstr  8 44 "14400"
  275. matchstr  9 45 "16800"
  276. matchstr 10 46 "19200"
  277. matchstr 11 47 "21600"
  278. matchstr 12 48 "24000"
  279. matchstr 13 49 "26400"
  280. matchstr 14 50 "28800"
  281. matchstr 15 51 "29333"
  282. matchstr 16 52 "30667"
  283. matchstr 17 53 "31200"
  284. matchstr 18 54 "32000"
  285. matchstr 19 55 "33333"
  286. matchstr 20 56 "33600"
  287. matchstr 21 57 "34000"
  288. matchstr 22 58 "34667"
  289. matchstr 23 59 "36000"
  290. matchstr 24 60 "37333"
  291. matchstr 25 61 "38000"
  292. matchstr 26 62 "38667"
  293. matchstr 27 63 "40000"
  294. matchstr 28 64 "41333"
  295. matchstr 29 65 "42000"
  296. matchstr 30 66 "42667"
  297. matchstr 31 67 "44000"
  298. matchstr 32 68 "45333"
  299. matchstr 33 69 "46000"
  300. matchstr 34 70 "46667"
  301. matchstr 35 71 "48000"
  302. matchstr 36 72 "49333"
  303. matchstr 37 73 "50000"
  304. matchstr 38 74 "50667"
  305. matchstr 39 75 "52000"
  306. matchstr 40 76 "53333"
  307. matchstr 41 77 "54000"
  308. matchstr 42 78 "54667"
  309. matchstr 43 79 "56000"
  310. matchread 30
  311. jump 80
  312. !
  313. ! -- Connection rates --
  314. ! CommunicatingAt informs ARA of the raw modem to modem
  315. ! connection speed.
  316. !
  317. !******* take out "jump 80 ! " to allow that speed ********* tjm
  318. @LABEL 39
  319. note "Communicating at 2400 bps." 2
  320. CommunicatingAt 2400
  321. jump 80 ! jump 81
  322. !
  323. @LABEL 40
  324. note "Communicating at 4800 bps." 2
  325. CommunicatingAt 4800
  326. jump 80 ! jump 81
  327. !
  328. @LABEL 41
  329. note "Communicating at 7200 bps." 2
  330. CommunicatingAt 7200
  331. jump 80 ! jump 81
  332. !
  333. @LABEL 42
  334. note "Communicating at 9600 bps." 2
  335. CommunicatingAt 9600
  336. jump 80 ! jump 81
  337. !
  338. @LABEL 43
  339. note "Communicating at 12400 bps." 2
  340. CommunicatingAt 12400
  341. jump 80 ! jump 81
  342. !
  343. @LABEL 44
  344. note "Communicating at 14400 bps." 2
  345. CommunicatingAt 14400
  346. jump 80 ! jump 81
  347. !
  348. @LABEL 45
  349. note "Communicating at 16800 bps." 2
  350. CommunicatingAt 16800
  351. jump 80 ! jump 81
  352. !
  353. @LABEL 46
  354. note "Communicating at 19200 bps." 2
  355. CommunicatingAt 19200
  356. jump 80 ! jump 81
  357. !
  358. @LABEL 47
  359. note "Communicating at 21600 bps." 2
  360. CommunicatingAt 21600
  361. jump 80 ! jump 81
  362. !
  363. @LABEL 48
  364. note "Communicating at 24000 bps." 2
  365. CommunicatingAt 24000
  366. jump 80 ! jump 81
  367. !
  368. @LABEL 49
  369. note "Communicating at 26400 bps." 2
  370. CommunicatingAt 26400
  371. jump 80 ! jump 81
  372. !
  373. @LABEL 50
  374. note "Communicating at 28800 bps." 2
  375. CommunicatingAt 28800
  376. jump 81
  377. !
  378. @LABEL 51
  379. note "Communicating at 29333 bps." 2
  380. CommunicatingAt 29333
  381. jump 81
  382. !
  383. @LABEL 52
  384. note "Communicating at 30667 bps." 2
  385. CommunicatingAt 30667
  386. jump 81
  387. !
  388. @LABEL 53
  389. note "Communicating at 31200 bps." 2
  390. CommunicatingAt 31200
  391. jump 81
  392. !
  393. @LABEL 54
  394. note "Communicating at 32000 bps." 2
  395. CommunicatingAt 32000
  396. jump 81
  397. !
  398. @LABEL 55
  399. note "Communicating at 33333 bps." 2
  400. CommunicatingAt 33333
  401. jump 81
  402. !
  403. @LABEL 56
  404. note "Communicating at 33600 bps." 2
  405. CommunicatingAt 33600
  406. jump 81
  407. !
  408. @LABEL 57
  409. note "Communicating at 34000 bps." 2
  410. CommunicatingAt 34000
  411. jump 81
  412. !
  413. @LABEL 58
  414. note "Communicating at 34667 bps." 2
  415. CommunicatingAt 34667
  416. jump 81
  417. !
  418. @LABEL 59
  419. note "Communicating at 36000 bps." 2
  420. CommunicatingAt 36000
  421. jump 81
  422. !
  423. @LABEL 60
  424. note "Communicating at 37333 bps." 2
  425. CommunicatingAt 37333
  426. jump 81
  427. !
  428. @LABEL 61
  429. note "Communicating at 38000 bps." 2
  430. CommunicatingAt 38000
  431. jump 81
  432. !
  433. @LABEL 62
  434. note "Communicating at 38667 bps." 2
  435. CommunicatingAt 38667
  436. jump 81
  437. !
  438. @LABEL 63
  439. note "Communicating at 40000 bps." 2
  440. CommunicatingAt 40000
  441. jump 81
  442. !
  443. @LABEL 64
  444. note "Communicating at 41333 bps." 2
  445. CommunicatingAt 41333
  446. jump 81
  447. !
  448. @LABEL 65
  449. note "Communicating at 42000 bps." 2
  450. CommunicatingAt 42000
  451. jump 81
  452. !
  453. @LABEL 66
  454. note "Communicating at 42667 bps." 2
  455. CommunicatingAt 42667
  456. jump 81
  457. !
  458. @LABEL 67
  459. note "Communicating at 44000 bps." 2
  460. CommunicatingAt 44000
  461. jump 81
  462. !
  463. @LABEL 68
  464. note "Communicating at 45333 bps." 2
  465. CommunicatingAt 45333
  466. jump 81
  467. !
  468. @LABEL 69
  469. note "Communicating at 46000 bps." 2
  470. CommunicatingAt 46000
  471. jump 81
  472. !
  473. @LABEL 70
  474. note "Communicating at 46667 bps." 2
  475. CommunicatingAt 46667
  476. jump 81
  477. !
  478. @LABEL 71
  479. note "Communicating at 48000 bps." 2
  480. CommunicatingAt 48000
  481. jump 81
  482. !
  483. @LABEL 72
  484. note "Communicating at 49333 bps." 2
  485. CommunicatingAt 49333
  486. jump 81
  487. !
  488. @LABEL 73
  489. note "Communicating at 50000 bps." 2
  490. CommunicatingAt 50000
  491. jump 81
  492. !
  493. @LABEL 74
  494. note "Communicating at 50667 bps." 2
  495. CommunicatingAt 50667
  496. jump 81
  497. !
  498. @LABEL 75
  499. note "Communicating at 52000 bps." 2
  500. CommunicatingAt 52000
  501. jump 81
  502. !
  503. @LABEL 76
  504. note "Communicating at 53333 bps." 2
  505. CommunicatingAt 53333
  506. jump 81
  507. !
  508. @LABEL 77
  509. note "Communicating at 54000 bps." 2
  510. CommunicatingAt 54000
  511. jump 81
  512. !
  513. @LABEL 78
  514. note "Communicating at 54667 bps." 2
  515. CommunicatingAt 54667
  516. jump 81
  517. !
  518. @LABEL 79
  519. note "Communicating at 56000 bps." 2
  520. CommunicatingAt 56000
  521. jump 81
  522. !
  523. @LABEL 80
  524. note "Communicating at an unknown rate." 2
  525. !jump 81
  526. jump 125  ! tjm
  527. !
  528. !
  529. ! Look for reliablilty and compression results 
  530. ! at the end of the connect result.
  531. !
  532. @LABEL 81
  533. pause 10 !tjm
  534. matchclr
  535. matchstr  1 83 "LAPM"
  536. matchstr  2 83 "REL"
  537. matchstr  3 83 "ARQ"
  538. matchstr  4 85 "COMP/"
  539. matchstr  5 85 "COMP\13"
  540. matchstr  6 83 "V42/"
  541. matchstr  7 83 "V42\13"
  542. matchstr  8 85 "V42BIS"
  543. matchstr  9 85 "V42bis"
  544. matchstr 10 83 "MNP\13"
  545. matchstr 11 85 "MNP5"
  546. matchstr 12 86 "\10"
  547. matchread 30
  548. jump 86
  549. ! -- Modem error correction link negotiation --
  550. ! Userhook 2 informs ARA that a modem-to-modem error
  551. ! correcting protocol has been negotiated
  552. !
  553. !
  554. @LABEL 82
  555. note "Modem Reliable Link Established." 2
  556. !pause 10  !tjm
  557. userhook 2
  558. jump 32
  559. !
  560. @LABEL 83
  561. note "Modem Reliable Link Established." 2
  562. !pause 10  !tjm
  563. userhook 2
  564. jump 81
  565. !
  566. ! -- Compression negotiation --
  567. ! Userhook 3 informs ARA that a modem-to-modem compression
  568. ! protocol has been negotiated
  569. !
  570. @LABEL 84
  571. note "Modem Compression Established." 2
  572. !pause 10  !tjm
  573. userhook 3
  574. jump 32
  575. !
  576. @LABEL 85
  577. note "Modem Compression Established." 2
  578. !pause 10  !tjm
  579. userhook 3
  580. jump 81
  581. !
  582. !
  583. ! -- Normal exit after "CONNECT" --
  584. !
  585. !  This modem has been setup to do CTS handshaking,
  586. !  and we assume that a CTS handshaking cable is being used.
  587. !
  588. @LABEL 86
  589. ! Turn on CTS handshaking.
  590. !note "turn on cts handshaking." 2  !tjm
  591. !pause 10
  592. HSReset 0 1 0 0 0 0
  593. !
  594. ifANSWER 87
  595. pause 30
  596. @LABEL 87
  597. exit 0
  598. !
  599. !
  600. ! ---- Answer calls ----
  601. !
  602. ! A RING results from the modem in ANSWERING mode
  603. ! claims the serial port and answering the phone
  604. !
  605. @LABEL 88
  606. ifORIGINATE 32
  607. userhook 1
  608. note "Answering phone..." 2
  609. write "ATA\13"
  610. jump 32
  611. !  
  612. ! ---- Hang up and reset modem ----
  613. !
  614. @HANGUP 
  615. @LABEL 90 
  616. settries 0
  617. HSReset 0 0 0 0 0 0
  618. !
  619. @LABEL 91
  620. ! Try to get control of the modem
  621. !pause 1
  622. !write "+++"
  623. !pause 1 
  624. !matchclr
  625. !matchstr 1 96 "OK\13\10"
  626. !pause 15
  627. !write "AT\13"
  628. !matchread 30
  629. !
  630. @LABEL 94
  631. ! Force a hangup                            (••••• Different from Original script for 1st gen. PB G3)
  632. matchclr
  633. matchstr 1 98 "NO CARRIER\13\10"
  634. matchstr 2 98 "OK\13\10"
  635. matchstr 3 98 "ERROR\13\10"
  636. matchstr 4 98 "0\13\10"
  637. matchstr 5 98 "DELAYED"
  638. matchstr 6 98 "BLACKLISTED"
  639. write "+++ATH\13"
  640. matchread 30
  641. ! Try again to get control of the modem by toggling DTR
  642. !
  643. @LABEL 95
  644. DTRClear
  645. Pause 2
  646. DTRSet
  647. flush
  648. !
  649. !
  650. ! Try the hangup sequence three times otherwise declare an error
  651. inctries
  652. iftries 3 101
  653. jump 91
  654. !
  655. @LABEL 96
  656. !
  657. ! Pause between data and command mode
  658. !
  659. pause 50
  660. jump 94
  661. !
  662. !
  663. @LABEL 97
  664. ! AT&F resulted in Error, try again using AT&F
  665. pause 15
  666. matchclr
  667. matchstr 1 99 "OK\13\10"
  668. write "AT&F\13"
  669. matchread 30
  670. jump 101
  671. !
  672. @LABEL 98
  673. ! Got control of the modem.  Recall the factory settings.  If it fails, jump 97.
  674. pause 15
  675. matchclr
  676. matchstr 1 99 "OK\13\10"
  677. matchstr 2 97 "ERROR\13\10"
  678. write "AT&F\13"
  679. matchread 30
  680. jump 101
  681. !
  682. @LABEL 99
  683. exit 0
  684. !
  685. ! ---- Error messages -----
  686. !
  687. ! Modem Not Responding
  688. @LABEL 101
  689. write "AT&F\13"
  690. pause 10
  691. exit -6019
  692. !
  693. ! No Dial Tone
  694. @LABEL 102
  695. matchstr 1 121 "OK\13\10"
  696. write "AT&F\13"
  697. matchread 30
  698. @LABEL 121
  699. exit -6020
  700. !
  701. ! No Carrier or Error
  702. @LABEL 103
  703. matchstr 1 122 "OK\13\10"
  704. write "AT&F\13"
  705. matchread 30
  706. @LABEL 122
  707. exit -6021
  708. !
  709. ! Busy
  710. @LABEL 104
  711. matchstr 1 123 "OK\13\10"
  712. write "AT&F\13"
  713. matchread 30
  714. @LABEL 123
  715. exit -6022
  716. !
  717. ! No Answer
  718. @LABEL 105
  719. matchstr 1 124 "OK\13\10"
  720. write "AT&F\13"
  721. matchread 30
  722. @LABEL 124
  723. exit -6023
  724. !
  725. ! User Cancellation
  726. @LABEL 107
  727. matchstr 1 108 "OK\13\10"
  728. write "AT&F\13"
  729. matchread 30
  730. @LABEL 108
  731. exit -6008
  732. !
  733. ! ---- DELAYED and BLACKLISTED functions ----
  734. @LABEL 110
  735. matchclr
  736. matchstr  1 119 "00:00:0"
  737. matchstr  2 118 "00:00:1"
  738. matchstr  3 117 "00:00:2"
  739. matchstr  4 116 "00:00:3"
  740. matchstr  5 115 "00:00:4"
  741. matchstr  6 114 "00:00:5"
  742. matchstr  7 113 "00:01:"
  743. matchstr  8 112 "00:02:"
  744. matchread 30
  745. ! (modified on 10/5/98) - Added the display in case delayed for more than 3 minutes exit with User Cancellation
  746. note "'DELAYED'. For more than 3 minutes."
  747. pause 20
  748. exit -6008
  749. !
  750. !The number is 'DELAYED' more than 3 minutes.  Exit the script telling the user to wait or reset his modem.
  751. !exit -6019 "\13The modem responds 'DELAYED':\13(Cannot redial this number right now.)\13To try again immediately, turn modem OFF and ON before proceeding."
  752. @LABEL 111
  753. !
  754. ! (modified on 10/5/98) - Added the display of the right string and exit with User Cancellation
  755. note "'BLACKLISTED'."
  756. pause 20
  757. exit -6008
  758. !
  759. !The number is 'BLACKLISTED'.  Exit the script, telling the user to reset his modem.
  760. !exit -6019 "\13The modem responds 'BLACKLISTED':\13(Cannot redial this number again.)\13Double-check the number, then turn your modem OFF and ON before proceeding."
  761. !
  762. @LABEL 112
  763. note "'DELAYED'. Redialing in 3 minutes..."
  764. pause 600
  765. @LABEL 113
  766. note "'DELAYED'. Redialing in 2 minutes..."
  767. pause 600
  768. @LABEL 114
  769. note "'DELAYED'. Redialing in 1 minute... "
  770. pause 100
  771. @LABEL 115
  772. note "'DELAYED'. Redialing in 50 seconds..."
  773. pause 100
  774. @LABEL 116
  775. note "'DELAYED'. Redialing in 40 seconds..."
  776. pause 100
  777. @LABEL 117
  778. note "'DELAYED'. Redialing in 30 seconds..."
  779. pause 100
  780. @LABEL 118
  781. note "'DELAYED'. Redialing in 20 seconds..."
  782. pause 100
  783. @LABEL 119
  784. note "'DELAYED'. Redialing in 10 seconds..."
  785. pause 100
  786. jump 1
  787. ! Labels 121-128 are reserved for emergency hacks.
  788. !
  789. !
  790. @LABEL 125
  791. ! redial if rate below 28880 [tjm]
  792. !
  793. ! Force a hangup
  794. matchclr
  795. matchstr 1 126 "NO CARRIER\13\10"
  796. matchstr 2 126 "OK\13\10"
  797. matchstr 3 126 "ERROR\13\10"
  798. matchstr 4 126 "0\13\10"
  799. matchstr 5 126 "DELAYED"
  800. matchstr 6 126 "BLACKLISTED"
  801. write "+++ATH\13"
  802. matchread 30
  803. !
  804. !
  805. ! Send message back so ppp redials
  806. @LABEL 126
  807. note "Connection less than 28000 ... redialing." 2 ! 40 chars max
  808. pause 20
  809. note "Select Cancel to stop redialing." 2
  810. pause 20
  811. !exit -6022  ! busy
  812. jump 2
  813.